Docker installation and sharing of common commands and sharing of common docker commands
Basic commands
1. To install docker in yum, the root permission is required.
Yum install docker
Summary of common docker entry-level commands and common docker entry-level commands
1. View version information
Docker version
2. Search for images (images are generally stored by user name/image name, except for some special basic images)
http://segmentfault.com/a/1190000000751601This article only records the use of Docker commands in most situations, and if you want to know the details of each option, please refer to the official documentation, which is recorded only as a later memo.According to their own understanding, generally divided into the following types:
Container Life cycle Management-
our previous Docker tutorial, we learned that mirroring is stored in Docker registry. The image in registry can be found by using the following command:
Docker Search (Image-name)
To view the historical version of the image, you can execute the following command:
Docker tips and Common commands and docker tipsInstall docker
Check whether the curl package is installed?which curl
If curl is not installed, update the apt source and install curl as follows:apt-get updateapt-get install curlapt-get updatewget -qO- https://get.docker.com/ | sh
Set the current user as the
Docker ~ Run multiple commands and docker multiple commands
Recently, we are working on the deployment of jenkins pipeline. you do not want to install the dotnet sdk when deploying net core. For better portability, you plan to directly use the docker image of aspnetcore and
A few days ago encountered such a business scenario, the database runs in the Docker, the Docker city is UTC so it is 8 hours away from the Beijing time. However, you cannot rerun a container, only to ensure that the database is running, and to copy the host's time zone to the Docker container. Very distressed,
First I change the host's time zone to CST Beijing
Docker Introductory Tutorial (vii) Docker API "Editor's note" dockerone organization translated FLUX7 's Docker starter tutorial, this is the seventh in a series of introductory tutorials focusing on the Docker Registry API and th
ServicesNode Manage Docker Swarm nodes
System Operation:
Version show the Docker version informationEvents get real time events from the server (continuous return Docker event)Info Display system-wide information (displays Docker host system-wide information)
Some of the more interesting
.
Support for multi-tenant platforms.
Docker Daemon's attack surface, Docker daemon, runs as root, which means there are some issues that require extra care.Here are some things to keep in mind:
Docker daemon control should only be granted to authorized users when Docker allows sharing with the guest
to a local mirror library, for example[Plain]View PlainCopy
sudo docker load--input Ubuntu_14.04.tar
Or[Plain]View PlainCopy
$ sudo docker load
This imports the image and its associated metadata information (including tags, and so on).Ii. container-related commands1. Start the containerThere are two ways to start a container, one is to create a new container based on the mirro
rmi [image]
docker rmi training/sinatra
Note: This tag is used by default when the tag name is not specified in the image latest. However, the meaning of latest is not the same as the head of the VCS, it is not the latest image, just the image that represents the tag name latest. If there is no image with the tag name called latest, it will be an error.SummarizeAlthough Docker is a virtualiza
Fstab and mount the new location to the/var/lib/docker#vim/etc/fstab...$DOCKER _dir/var/lib/docker None bind 0 05 re-mount:mount–a6 Use the following command to check#df-H/var/lib/docker/Filesystem Size used Avail use% mounted on/dev/sda6 110G 100G 9.9G 92%/var/lib/docker7 Go to Container view our spacebash-4.1# DF-LH
Docker service is a declarative, scalable, load-balanced application. Docker service is a user-oriented application, while Docker swarm is an IT-oriented node cluster.
Docker service is often run on the basis of Docker swarm.
Common
Recently studied Docker, and experimented with all of the Docker commands, with the following special finishing:# docker--helpusage:docker [OPTIONS] COMMAND [arg ...] Docker daemon [--help | ...] Docker [-H |--help |-V |--ve
filesystem # view Docker container changesEvents get real time events from the server # Get container Live event from Docker serviceexec run a command in an existing container # running commands on an existing containerExport Stream the contents of a container as a tar archive# Export container's content stream as a tar archive [corresponding to import]History s
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.